﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BuildHelper.Setup.ProcedurySql
{
    public partial class FormProcedury : MyBaseSqlCeForm
    {
        public FormProcedury()
        {
            InitializeComponent();
        }

        public FormProcedury(object value)
            : base(value)
        {
            InitializeComponent();
        }

        private void bbiReadFromFile_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ProceduryTools.ReadProc(openFileDialog1.FileName, this.proceduryDataSet1);
            }
        }

        private void edtPlik_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (!edtPlik.Properties.ReadOnly)
            {
                if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    edtPlik.EditValue = openFileDialog1.FileName;
                }
            }
        }

    }
}
